package com.study.person.dao;

import static org.junit.Assert.*;

import org.junit.Test;

import com.study.person.bean.PersonInfo;

public class PersonDaoTest {

	@Test
	public void testSave() {
		
		PersonInfo info = new PersonInfo();
		info.setId("4");
		info.setName("Jack");
		info.setSex("2");
		info.setAge(21);
		info.setAddress("America");
		PersonDao.save(info);
		
	}
	
	@Test
	public void testSaveOrUpdate() {
		
		PersonInfo info = new PersonInfo();
		info.setId("4");
		info.setName("Alise");
		info.setSex("1");
		info.setAge(21);
		info.setAddress("America");
		PersonDao.saveOrUudate(info);
		
	}
	
	@Test
	public void testUpdate() {
		
		PersonInfo info = new PersonInfo();
		info.setId("4");
		info.setName("Alise");
		info.setSex("1");
		info.setAge(21);
		info.setAddress("America");
		PersonDao.update(info);
		
	}
	
	@Test
	public void testDelete() {
		
		PersonInfo info = new PersonInfo();
		info.setId("2");
		info.setName("Alise");
		info.setSex("1");
		info.setAge(21);
		info.setAddress("America");
		PersonDao.delete(info);
		
	}
	
	@Test
	public void testQuery() {
		//see PersonDao main method
		
	}
	
	
	
	
	
	

}
